import { NextResponse } from 'next/server';
import { importAttributeTables } from '@/lib/attribute-importer';

export async function POST(request: Request) {
  try {
    const result = await importAttributeTables();
    return NextResponse.json(result);

  } catch (error: any) {
    console.error('[API/import-attribute-tables] Error:', error);
    return NextResponse.json({ message: `导入失败: ${error.message}` }, { status: 500 });
  }
} 